package com.wecloud.core.data.jnl;

import java.util.HashMap;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.support.TransactionTemplate;

import com.wecloud.core.constant.WeContext;
import com.wecloud.core.data.config.BussinessClient;
import com.wecloud.core.exception.WeException;

@SuppressWarnings("rawtypes")
public class JnlService extends BussinessClient implements JnlSqlAware{
	@Autowired
	private TransactionTemplate transactionTemplate;
	
	private Map<String,JnlService> jnlConfigs = new HashMap<String,JnlService>();
	
	public Map<String, JnlService> getJnlConfigs() {
		return jnlConfigs;
	}
	public void setJnlConfigs(Map<String, JnlService> jnlConfigs) {
		this.jnlConfigs = jnlConfigs;
	}
	
	public JnlService getJnlService(String transactionId){
		return jnlConfigs.get(transactionId);
	}
	public TransactionTemplate getTransactionTemplate() {
		return transactionTemplate;
	}
	@Override
	public void write(Map map) throws WeException {
		
	}
	@Override
	public void update(Map map) throws WeException {
		// TODO Auto-generated method stub
		
	}
	@Override
	public void query(Map map) throws WeException {
		// TODO Auto-generated method stub
		
	}
	@Override
	public void delete(Map map) throws WeException {
		// TODO Auto-generated method stub
		
	}
	public void prepareJnlData(WeContext context){
		
	}
}
